import request from '@/utils/request'
import type { ResApi, AuthListRes } from '@/types/auth'

// 权限列表
export const getAuthListApi = () => {
  return request<ResApi<AuthListRes[]>>({
    method: 'get',
    url: '/auth/index',
  })
}

// 新增权限
export const addAuthApi = (data: any) => {
  return request({
    method: 'post',
    url: '/auth/create',
    data,
  })
}
